For example, in the Computer Aided Design (CAD), in order to express an object precisely, the object is often expressed as a collection of trimmed surfaces. As illustrated in FIG. 89, a trimmed surface is a certain area on a base surface 1001 or an expanded surface thereof, which is surrounded by an outer loop 1002 that is a closed line on a surface, which has no self-intersections, and is a figure that is generated by removing areas that are surrounded by inner loops 1003 and 1004 that are closed curves inside of the certain area. However, there are cases in which there are no inner loops 1003 and 1004. Moreover, there are special cases in which the boundary of the base surface matches the outer loop.
In a computer of a CAD system, information about an object surface that is formed from a collection of trimmed surfaces that are internally stored, and display conditions such as a viewpoint and lighting condition are given, and the shape of an object is displayed as a collection of trimmed surface images.
The term “trimmed surface” has been used since the time when a surface modeler was mainstream, however, it is used regardless of whether or not topological information, which is data that expresses the connection relationship between trimmed surfaces, is retained. In the case of a solid modeler that has data expressing the connection relationship between trimmed surfaces, a trimmed surface corresponds to the term “face”.
The trimmed surfaces generated in the CAD cannot be displayed on a screen in the form of a curved surface that expresses the base surface or curves on a surface. Therefore, a conventional technique is known in which a display of trimmed surfaces is realized by executing approximation (tessellation or triangulation) of the trimmed surface in FIG. 89 to a collection of triangles such as illustrated in FIG. 90, and displaying each triangle using a Z buffer for a hidden-surface removal. The tessellation of a trimmed surface is characterized in that the curves on a surface and the curves of constant parameter values on the base surface are approximated to a series of line segments, and the intersections of both are referenced to perform triangulation, however, there is a problem in that tessellation of a trimmed surface requires a long calculation time.
On the other hand, in a graphics system that displays this kind of trimmed surfaces, there is conventional technique that uses the following mask, and the present invention is related to this conventional technique. In other words, in the conventional technique, based on the tessellation method, triangulation of the base surface is performed, and whether a trim curve intersects any triangle is determined. When any intersection occurs, a point of intersection between that triangle and the trim curve is calculated, and based on the intersecting state, a mask buffer is generated so that the inside of the trimmed surface is displayed. When pixels that correspond to the inside of the triangle are displayed on the display screen, “1”, which means the mask is OFF, is set for each pixel in the mask buffer, and when the pixels are not displayed, “0” is set, which means the mask is ON. When displaying triangles that were generated by triangulation on the display screen, the pixel values of all of the pixels inside the triangles are calculated, and, when the mask value of a pixel is “1”, the pixel is displayed on the display screen, and when the mask value of a pixel is “0”, that pixel is not displayed on the screen. This display processing is repeated for all of the triangles. In a disclosed conventional technique, negative logic is employed, where “1” means the mask is OFF, and “0” means the mask is ON, however, when building a system, there is no problem in using positive logic, where “0” means the mask is OFF, and “1” means the mask is ON.
Even in the conventional technique that uses this kind of mask, the tessellation technique for the trimmed surfaces is used so the intersections with trim curves have to be determined for each triangle, and when there is a large number of triangles, many calculations for the intersection determination are performed, so there is a problem in that an excessive amount of calculation time is required.